package jtk.project4.fleet.field;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.ComboField;
import nl.coderight.jazz.form.field.TextField;

public class GeneralTankInformationField extends GroupControl
{
	private TextField DescriptionField;
	private TextField FuelTypeField;
	private ComboField StatusField;
	
	public GeneralTankInformationField(String bindID)
	{
		setTitle("header.GeneraTanklInformation");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields()
	{
		DescriptionField = new TextField ("Description", 20);
		DescriptionField.setRequired(true);
		
		FuelTypeField = new TextField ("FuelType", 20);
		FuelTypeField.setRequired(true);
		
		StatusField = new ComboField <String>("Status","wow");
		StatusField.setPreferredSize(FuelTypeField.getPreferredSize());
	}
	
	private void createLayout()
	{
		setLayout(new FormLayout())
		.addLabel("label.Description").addField(DescriptionField)
		.addRow()
		.addLabel("label.FuelType").addField(FuelTypeField)
		.addRow()
		.addLabel("label.Status").addField(StatusField)
		;	
	}
}
